home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / dev / sun4c.md / devInt.h < prev    next >
C/C++ Source or Header  |  1990-11-27  |  3KB  |  83 lines

  1. /*
  2.  * devInt.h --
  3.  *
  4.  *    Internal globals and constants needed for the dev module.
  5.  *
  6.  * Copyright 1989 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/src/kernel/dev/sun3.md/RCS/devInt.h,v 9.2 90/11/27 12:55:40 mgbaker Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _DEVINT
  19. #define _DEVINT
  20.  
  21. #include "vm.h"
  22.  
  23.  
  24. /*
  25.  * A configuration table that describes the controllers in the system.
  26.  */
  27. typedef struct DevConfigController {
  28.     char *name;        /* Identifying string used in print statements */
  29.     int address;    /* The address of the controller.  Correct
  30.              * interpretation of this depends on the space */
  31.     int space;        /* DEV_MULTIBUS, DEV_VME_16D16, ...
  32.              * This is used to convert what the hardware thinks
  33.              * is its address to what the MMU of the system
  34.              * uses for those kinds of addresses.  For example,
  35.              * Sun2's have Multibus memory mapped into a
  36.              * particular range of kernel virtual addresses. */
  37.     int controllerID;    /* Controller number: 0, 1, 2... */
  38.     ClientData (*initProc) _ARGS_((struct DevConfigController *ctrlLocPtr));
  39.             /* Initialization procedure */
  40.     int vectorNumber;    /* Vector number for autovectored architectures */
  41.     Boolean (*intrProc) _ARGS_((ClientData  clientData));
  42.             /* Interrupt handler called from autovector */
  43. } DevConfigController;
  44.  
  45. /*
  46.  * Definitions of address space types.
  47.  * DEV_OBMEM    - on board memory
  48.  * DEV_OBIO    - on board I/O devices.
  49.  * DEV_MULTIBUS - the Multibus memory on the Sun2
  50.  * DEV_MULTIBUS_IO - Multibus I/O space on the Sun2
  51.  * DEV_VME_DxAx - The 6 sets of VME address spaces available on
  52.  *    Sun3's.  Only D16A24 and D16A16 are available on VME based Sun2's.
  53.  * DEV_SBUS_OB - Sbus device in logical slot 0 (on-board device).
  54.  * DEV_SBUS - Sbus device in some physical slot (not an on-board device).
  55.  */
  56. #define DEV_OBMEM    0
  57. #define DEV_OBIO    1
  58. #define DEV_MULTIBUS    22
  59. #define DEV_MULTIBUS_IO    23
  60. #define DEV_VME_D16A32    31
  61. #define DEV_VME_D16A24    32
  62. #define DEV_VME_D16A16    33
  63. #define DEV_VME_D32A32    34
  64. #define DEV_VME_D32A24    35
  65. #define DEV_VME_D32A16    36
  66. #define DEV_SBUS_OB    37
  67. #define DEV_SBUS    38
  68.  
  69. /*
  70.  * Special valued returned from Controller init procedures indicating 
  71.  * the controller doesn't exists.
  72.  */
  73.  
  74. #define    DEV_NO_CONTROLLER    ((ClientData) 0)
  75.  
  76. /*
  77.  * The controller configuration table.
  78.  */
  79. extern DevConfigController devCntrlr[];
  80. extern int devNumConfigCntrlrs;
  81.  
  82. #endif /* _DEVINT */
  83.